package com.zkthink.ceres.applet.comment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zkthink.ceres.applet.comment.domain.entity.AppletComment;
import com.zkthink.ceres.order.vo.comment.MyCommentVo;
import com.zkthink.ceres.store.dto.CommentDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author cmz
 * @Date 2024-04-28 17:35
 */
public interface AppletCommentMapper extends BaseMapper<AppletComment> {
    List<CommentDto> StoreProjectXianqing(Long productId, String productType);

    @Select(" select  IFNULL(ROUND(avg(service_star),0),0)  score from applet_comment where product_id=#{productId}")
    int productComment(Long productId);

    List<MyCommentVo> findMyComment(@Param("mid") Long mid);
}